import random
t =int((input("请问您想随机选几次:")))
for i in range(1,t+1):
    while 1:
        red = random.randint(0, 3)
        yellow = random.randint(0, 3)
        green = random.randint(0, 6)
        if red+yellow+green == 8:
            print("第%d次选择:\n红球%d个\n黄球%d个\n绿球%d个"%(i,red,yellow,green))
            break
        else:
            pass